package com.pes.arcww.service;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.pes.arcww.dao.ExamsDAO;
import com.pes.arcww.form.Exams;
import com.pes.arcww.form.ExamsItems;


@Service("examService")
public class ExamsServiceImpl implements ExamsService {
	
	@Autowired
	private ExamsDAO examDAO;
	
	@Transactional
	public void addExam(Exams exam) {
		examDAO.addExam(exam);
	}
	
	@Transactional
	public void addExamsItems(Integer exa_id, ExamsItems item) {
		examDAO.addExamsItems(exa_id, item);
	}

	@Transactional
	public Collection<Exams> listExams(String filter, String value) {
		return examDAO.listExams(filter, value);
	}

	@Transactional
	public Exams getExam(Integer id) {
		return examDAO.getExam(id);
	}

	@Transactional
	public void removeExam(Integer id) {
		examDAO.removeExam(id);
	}

	@Transactional
	public void updateExam(Exams exam) {
		examDAO.updateExam(exam);
	}

}
